Skip to content

IPv6 support #1896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 22, 2025
Merged

IPv6 support #1896

merged 5 commits into from
May 22, 2025

Conversation

wh1ter4bb1t-js
Copy link
Contributor

Add Support for IPv6 addresses

This PR addresses #1252.

This change tries to better generalize the host address in order to support both IPv4 and IPv6 address families

In this PR the debug workflows have changed in the following manner:

  • When passing the full {host}:{port} path, the host can now utilize [::1] or any other IPv6 address
  • The default cases will check if IPv4 or IPv6 is available:
    • if IPv4 is unavailable then the default host will be [::1]
    • if IPv4 is available or IPv6 is also unavailable the host will default back to 127.0.0.1

Nuances:

  • getsockname will always return >= 2 (2 in the case of IPv4 and 4 in the case of IPv6) so to ensure that there is no complicated branching logic we always take a [:2] slice.
  • since the majority of the cases that are being updated here is in order to replace 127.0.0.1 to either 127.0.0.1 or ::1 we opted to refer to the host when utilizing these values as localhost

@wh1ter4bb1t-js wh1ter4bb1t-js requested a review from a team as a code owner May 22, 2025 00:05
@rchiodo
Copy link
Contributor

rchiodo commented May 22, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@wh1ter4bb1t-js
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Google"

@rchiodo
Copy link
Contributor

rchiodo commented May 22, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rchiodo
Copy link
Contributor

rchiodo commented May 22, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rchiodo
Copy link
Contributor

rchiodo commented May 22, 2025

Looks good. Thanks for the submission.

@rchiodo rchiodo merged commit 34d5de9 into microsoft:main May 22, 2025
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants